<template>
    <div>
      {{ time | filterData }}
      {{ time | filterData }}
      <br>
      {{ price }}
      <br>
      {{ price | filterUnit }}
    </div>
  </template>
  
  <script>
  
  export default {
    data(){
      return{
        time: new Date(),
        time2: new Date('2024-01-01'),
        price: 100
      }
    },
    methods:{
  
    },
    filters:{
     filterDate: (time)=>{
      let year = time.getFullYear()
      let month = time.getMonth() + 1
      let date = time.getDate()
      let dateStr = year + '年' + month + '月' + date + '日'
      return dateStr
     }
    },
  
  }
  </script>
  
  <style>
  
  </style>